package com.example.hotHub.enums;

import lombok.*;

@ToString
@Getter
public enum QuoteTypeEnum {

    LITERATURE("d", "文学"),
    ORIGINAL("e", "原创"),
    POETRY("i", "诗词"),
    PHILOSOPHY("k", "哲学")
    ;

    String typeCode;

    String typeName;

    private QuoteTypeEnum(String typeCode, String typeName) {
        this.typeCode = typeCode;
        this.typeName = typeName;
    }

    public static QuoteTypeEnum getRandomQuoteType() {
        QuoteTypeEnum[] values = QuoteTypeEnum.values();
        int pos = (int) (Math.random() * 100);
        QuoteTypeEnum value = values[pos % values.length];
        return value;
    }

}
